import * as actionTypes from './actionTypes'
import { fromJS } from 'immutable'
const defaultState = fromJs({
    articleList: [],
    recommendList: [],
    topicList: []
})

export default (state = defaultState, action) => {
    switch ( action.type ) {
        case actionTypes.GET_HOME_DATA:
        return state.merge({
            articleList: action.data.articleList,
            recommendList: action.data.recommendList,
            topicList: action.data.topicList,
        })
    }
   
    return state;
}

